public class Draw {
    private int height;
    public Draw(int height) {
        if (height<3) {
            System.out.print("false");
        }
        else{
        this.height = height;}
    }
    public void drawTriangle() {
        for (int a=0;a<height;a++) {
            for (int b=0; b<height-a-1; b++) {
                System.out.print(" ");
            }
            for (int c=0; c<2*a+1; c++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
    public void drawRectangle(int width) {
        for (int a=0; a<height; a++) {
            for (int b=0; b<width; b++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
    public void drawSquare() {
        drawRectangle(height);
    }
    public void drawParallelogram(int width) {
        for (int a=0; a<height; a++) {
            for (int b=0; b<a; b++) {
                System.out.print(" ");
            }
            for (int c=0; c<width; c++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        Draw draw1= new Draw(4);
        draw1.drawTriangle();
        System.out.println("\n");
        Draw draw2 = new Draw(3);
        draw2.drawRectangle(4);
        System.out.println("\n");
        Draw draw3 = new Draw(5);
        draw3.drawSquare();
        System.out.println("\n");
        Draw draw4 = new Draw(2);
        draw4.drawParallelogram(3);
    }
}
